package com.qyhl.webtv.commonlib.utils;

import android.app.Activity;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import android.view.View;

import com.qyhl.webtv.basiclib.utils.LogUtil;
import com.qyhl.webtv.basiclib.utils.StringUtils;
import com.qyhl.webtv.commonlib.common.CommonUtils;
import com.qyhl.webtv.commonlib.constant.ARouterPathConstant;
import com.qyhl.webtv.commonlib.constant.AppConfigConstant;
import com.qyhl.webtv.commonlib.entity.news.GlobalNewsBean;
import com.qyhl.webtv.commonlib.utils.action.ActionConstant;
import com.qyhl.webtv.commonlib.utils.action.ActionLogUtils;
import com.qyhl.webtv.commonlib.utils.config.AppConfigUtil;
import com.qyhl.webtv.commonlib.utils.router.RouterManager;

import es.dmoral.toasty.Toasty;

/**
 * Created by qyhl on 2017/12/10.
 * 跳转
 */

public class ItemSkipUtils {
    private static final ItemSkipUtils skip = new ItemSkipUtils();

    private ItemSkipUtils() {
    }

    public static ItemSkipUtils getInstance() {
        return skip;
    }

    /**
     * 新闻点击跳转
     *
     * @param bean 0:置顶 1:普通新闻 2:图片新闻 3:视频新闻 4:广告 5:互动直播  6:新趣汇 7:小视频 8:标题新闻 9:普通直播 10.抓取新闻 11.乡镇 12.政务 13.专题 14.图文直播 15.圈子 16.圈子话题 17.报料栏目 18.报料   100.乡镇，政务推荐标题
     */
    public void itemSkip(GlobalNewsBean bean, Context context) {
        Activity activity = (Activity) context;
        String className = activity.getLocalClassName();
        boolean isSaveLog = false;
        String toScene = "";
        if (className.contains("HomeActivity")) {
            isSaveLog = true;
        }
        Bundle bundle = new Bundle();
        switch (bean.getType()) {
            case "0":
                itemTopSkip(bean, context);
                break;
            case "1":
                bundle.putString("id", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.NORMAL_NEWS_ACTIVITY, bundle);
                toScene = "news";
                break;
            case "2":
                bundle.putString("id", bean.getNewsId());
                bundle.putString("section", bean.getCatalogId());
                RouterManager.router(ARouterPathConstant.PICTURE_NEWS_ACTIVITY, bundle);
                toScene = "news";
                break;
            case "3":
                bundle.putString("id", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.VIDEO_NEWS_ACTIVITY, bundle);
                toScene = ActionConstant.NEWSDETAIL;
                break;
            case "4":
                if (StringUtils.isEmpty(bean.getUrl())) {
                    switch (bean.getLivetype()) {
                        case "1":
                            bundle.putString("id", bean.getCatalogId());
                            RouterManager.router(ARouterPathConstant.TELE_VIDEO_ACTIVITY, bundle);
                            break;
                        case "2":
                            bundle.putString("id", bean.getCatalogId());
                            RouterManager.router(ARouterPathConstant.SCOOP_DETAIL_ACTIVIT, bundle);
                            break;
                        case "3":
                            switch (bean.getOrigin()) {
                                case "1":
                                    bundle.putString("id", bean.getCatalogId());
                                    RouterManager.router(ARouterPathConstant.NORMAL_NEWS_ACTIVITY, bundle);
                                    break;
                                case "2":
                                    bundle.putString("id", bean.getCatalogId());
                                    bundle.putString("section", bean.getPublishDate());
                                    RouterManager.router(ARouterPathConstant.PICTURE_NEWS_ACTIVITY, bundle);
                                    break;
                                case "3":
                                    break;
                                case "4":
                                    break;
                                case "5":
                                    bundle.putString("id", bean.getCatalogId());
                                    RouterManager.router(ARouterPathConstant.VIDEO_NEWS_ACTIVITY, bundle);
                                    break;
                                case "8":
//                                    Router.build("room_act")
//                                            .with("roomId", Integer.parseInt(bean.getCatalogId()))
//                                            .go(context);
                                    break;
                                case "101":
                                    bundle.putString("id", bean.getCatalogId());
                                    RouterManager.router(ARouterPathConstant.NEWS_CATCH, bundle);
                                    break;
                                default:
                                    break;
                            }
                            break;
                        case "4":
                            bundle.putString("actId", bean.getCatalogId());
                            RouterManager.router(ARouterPathConstant.ACT_DETAILS, bundle);
                        case "5":

                            String userName = CommonUtils.getInstance().getUserName();
                            bundle.putString("userName", userName);
                            bundle.putInt("id", Integer.parseInt(bean.getCatalogId()));
                            RouterManager.routerLoginInterceptor(context,bundle,ARouterPathConstant.NINE_LUCK_DRAW);
                            break;
                        case "0":
                        default:
                            bundle.putString("id", bean.getNewsId());
                            bundle.putString("title", bean.getTitle());
                            bundle.putString("url", bean.getUrl());
                            if (bean.getIsShare() != null && "0".equals(bean.getIsShare())) {
                                bundle.putBoolean("hasShare", false);
                            }else{
                                bundle.putBoolean("hasShare", true);
                            }
                            RouterManager.router(ARouterPathConstant.ADV, bundle);
                            break;
                    }
                } else {
                    bundle.putString("id", bean.getNewsId());
                    bundle.putString("title", bean.getTitle());
                    bundle.putString("url", bean.getUrl());
                    if (bean.getIsShare() != null && "0".equals(bean.getIsShare())) {
                        bundle.putBoolean("hasShare", false);
                    }else{
                        bundle.putBoolean("hasShare", true);
                    }
                    RouterManager.router(ARouterPathConstant.ADV, bundle);
                }

                toScene = ActionConstant.ADV;
                break;
            case "5":
                int id;
                try {
                    id = Integer.parseInt(bean.getNewsId());
                } catch (Exception e) {
                    id = -1;
                }
//                Router.build("room_act")
//                        .with("roomId", id)
//                        .go(context);

                break;
            case "6":
                bundle.putString("newsId", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.GOOD_LIFE_DETAIL, bundle);
                toScene = ActionConstant.LIVE;
                break;
            case "7":
                bundle.putSerializable("bean", bean);
                RouterManager.router(ARouterPathConstant.SMALL_VIDEO_LIST, bundle);
                toScene = ActionConstant.SMALLVIDEO;
                break;
            case "8":
                bundle.putString("id", bean.getNewsId());
                bundle.putString("title", bean.getTitle());
                bundle.putString("url", bean.getUrl());
                bundle.putString("logo", bean.getCover());
                int hasShare = (int) AppConfigUtil.getInstance().getConValue(AppConfigConstant.LINK_URL_SHARE);
                if (hasShare == 1) {
                    bundle.putBoolean("hasShare", false);
                }else{
                    bundle.putBoolean("hasShare", true);
                }
                RouterManager.router(ARouterPathConstant.NEWS_TITLE, bundle);

                toScene = ActionConstant.NEWSDETAIL;
                break;
            case "9":
                if ("audio".equals(bean.getLivetype())) {
                    bundle.putString("id", bean.getNewsId());
                    RouterManager.router(ARouterPathConstant.LIVE_RADIO, bundle);

                } else {
                    bundle.putString("id", bean.getNewsId());
                    RouterManager.router(ARouterPathConstant.LIVE_VIDEO, bundle);
                }
                break;
            case "10":
                bundle.putString("id", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.NEWS_CATCH, bundle);
                toScene = ActionConstant.RECOMMENDNEWS;
                break;
            case "11":

                bundle.putString("id", bean.getCatalogId());
                bundle.putString("title", bean.getTitle());
                bundle.putString("cover", bean.getCover());
                RouterManager.router(ARouterPathConstant.DETAIL_TOWN, bundle);
                toScene = ActionConstant.TOWNDETAIL;
                break;
            case "12":
                bundle.putString("id", bean.getCatalogId());
                bundle.putString("title", bean.getTitle());
                bundle.putString("cover", bean.getCover());
                RouterManager.router(ARouterPathConstant.DETAIL_GOV, bundle);
                toScene = ActionConstant.GOVDETAIL;
                break;
            case "13":
                bundle.putString("id", bean.getCatalogId());
                bundle.putString("title", bean.getTitle());
                bundle.putString("cover", bean.getCover());
                RouterManager.router(ARouterPathConstant.DETAIL_SPECIAL, bundle);

                toScene = ActionConstant.SPECIADETAIL;
                break;
            case "14":
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                    bundle.putString("id", bean.getNewsId() + "");
                    RouterManager.router(ARouterPathConstant.TELE_VIDEO_ACTIVITY, bundle);
                    toScene = ActionConstant.TELETEXTDETAIL;
                } else {
                    Toasty.normal(context, "此功能暂时不支持在当前手机系统版本上使用！").show();
                }
                break;
            case "15":
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                    bundle.putString("id", bean.getNewsId());
                    RouterManager.router(ARouterPathConstant.CIRCLE_DETAIL, bundle);
                    toScene = ActionConstant.CIRCLEDETAIL;
                } else {
                    Toasty.normal(context, "此功能暂时不支持在当前手机系统版本上使用！").show();
                }

                break;
            case "16":
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                    bundle.putString("id", bean.getNewsId());
                    RouterManager.router(ARouterPathConstant.CIRCLE_TOPIC, bundle);

                    toScene = ActionConstant.CIRCLETOPIC;
                } else {
                    Toasty.normal(context, "此功能暂时不支持在当前手机系统版本上使用！").show();
                }
                break;
            case "17":
                //暂无
                break;
            case "18":
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                    bundle.putString("id", bean.getNewsId());
                    RouterManager.router(ARouterPathConstant.SCOOP_DETAIL_ACTIVIT, bundle);

                    toScene = ActionConstant.SCOOPDETAIL;
                } else {
                    Toasty.normal(context, "此功能暂时不支持在当前手机系统版本上使用！").show();
                }
                break;
            case "19"://新活动
                bundle.putString("actId", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.ACT_DETAILS, bundle);
                ActionLogUtils.getInstance().onEvent(ActionConstant.FLOWSCENE, ActionConstant.HOME, ActionConstant.ACTIVITY_DETAIL);
                break;
            case "100":

                bundle.putString("id", bean.getCatalogId());
                bundle.putString("title", bean.getTitle());
                RouterManager.router(ARouterPathConstant.NEWS_LIST, bundle);


                break;
            case "101":

                break;
            default:
                isSaveLog = false;
                break;
        }
        if (isSaveLog) {
            ActionLogUtils.getInstance().onEvent(ActionConstant.FLOWSCENE, ActionConstant.HOME, toScene);
        }
    }

    //  1:普通新闻 2:图片新闻 3:视频新闻 4:广告 5:互动直播  6:新趣汇 7:小视频 8:标题新闻 9:普通直播 10.抓取新闻 11.投票活动 12.线下活动
    public void itemTopSkip(GlobalNewsBean bean, Context context) {
        Activity activity = (Activity) context;
        String className = activity.getLocalClassName();
        boolean isSaveLog = false;
        String toScene = "";
        if (className.contains("HomeActivity")) {
            isSaveLog = true;
        }
        Bundle bundle = new Bundle();
        switch (bean.getTopStyle()) {
            case "1":
                bundle.putString("id", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.NORMAL_NEWS_ACTIVITY, bundle);
                toScene = ActionConstant.TOPNEWS;
                break;
            case "2":
                bundle.putString("id", bean.getNewsId());
                bundle.putString("section", bean.getCatalogId());
                RouterManager.router(ARouterPathConstant.PICTURE_NEWS_ACTIVITY, bundle);

                toScene = ActionConstant.TOPNEWS;
                break;
            case "3":
                bundle.putString("id", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.VIDEO_NEWS_ACTIVITY, bundle);
                toScene = ActionConstant.TOPNEWS;
                break;
            case "4":
                if (StringUtils.isEmpty(bean.getUrl())) {
                    switch (bean.getLivetype()) {
                        case "1":
                            bundle.putString("id", bean.getCatalogId());
                            RouterManager.router(ARouterPathConstant.TELE_VIDEO_ACTIVITY, bundle);
                            break;
                        case "2":
                            bundle.putString("id", bean.getCatalogId());
                            RouterManager.router(ARouterPathConstant.SCOOP_DETAIL_ACTIVIT, bundle);
                            break;
                        case "3":
                            switch (bean.getOrigin()) {
                                case "1":
                                    bundle.putString("id", bean.getCatalogId());
                                    RouterManager.router(ARouterPathConstant.NORMAL_NEWS_ACTIVITY, bundle);
                                    break;
                                case "2":
                                    bundle.putString("id", bean.getCatalogId());
                                    bundle.putString("section", bean.getPublishDate());
                                    RouterManager.router(ARouterPathConstant.PICTURE_NEWS_ACTIVITY, bundle);
                                    break;
                                case "3":
                                    break;
                                case "4":
                                    break;
                                case "5":
                                    bundle.putString("id", bean.getCatalogId());
                                    RouterManager.router(ARouterPathConstant.VIDEO_NEWS_ACTIVITY, bundle);
                                    break;
                                case "8":
//                                    Router.build("room_act")
//                                            .with("roomId", Integer.parseInt(bean.getCatalogId()))
//                                            .go(context);
                                    break;
                                case "101":
                                    bundle.putString("id", bean.getCatalogId());
                                    RouterManager.router(ARouterPathConstant.NEWS_CATCH, bundle);
                                    break;
                                default:
                                    break;
                            }
                            break;
                        case "4":
                            bundle.putString("actId", bean.getCatalogId());
                            RouterManager.router(ARouterPathConstant.ACT_DETAILS, bundle);
                        case "5":
                            String userName = CommonUtils.getInstance().getUserName();
                            bundle.putString("userName", userName);
                            bundle.putInt("id", Integer.parseInt(bean.getCatalogId()));
                            RouterManager.routerLoginInterceptor(context,bundle,ARouterPathConstant.NINE_LUCK_DRAW);
                            break;
                        default:
                            bundle.putString("id", bean.getNewsId());
                            bundle.putString("title", bean.getTitle());
                            bundle.putString("url", bean.getUrl());
                            if (bean.getIsShare() != null && "0".equals(bean.getIsShare())) {
                                bundle.putBoolean("hasShare", false);
                            }else{
                                bundle.putBoolean("hasShare", true);
                            }
                            RouterManager.router(ARouterPathConstant.ADV, bundle);
                            break;
                    }
                } else {
                    bundle.putString("id", bean.getNewsId());
                    bundle.putString("title", bean.getTitle());
                    bundle.putString("url", bean.getUrl());
                    if (bean.getIsShare() != null && "0".equals(bean.getIsShare())) {
                        bundle.putBoolean("hasShare", false);
                    }else{
                        bundle.putBoolean("hasShare", true);
                    }
                    RouterManager.router(ARouterPathConstant.ADV, bundle);
                }

                isSaveLog = false;
                break;
            case "5":
//                Router.build("room_act")
//                        .with("roomId", Integer.parseInt(bean.getNewsId()))
//                        .go(context);
                isSaveLog = false;
                break;
            case "6":
                bundle.putString("newsId", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.GOOD_LIFE_DETAIL, bundle);
                isSaveLog = false;
                break;
            case "7":
                bundle.putString("newsId", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.SMALL_VIDEO_DETAIL_ACTIVITY, bundle);
                isSaveLog = false;
                break;
            case "8":
                bundle.putString("id", bean.getNewsId());
                bundle.putString("title", bean.getTitle());
                bundle.putString("url", bean.getUrl());
                bundle.putString("logo", bean.getCover());
                int hasShare = (int) AppConfigUtil.getInstance().getConValue(AppConfigConstant.LINK_URL_SHARE);
                bundle.putBoolean("hasShare", hasShare != 1);
                RouterManager.router(ARouterPathConstant.NEWS_TITLE, bundle);
                toScene = ActionConstant.TOPNEWS;
                break;
            case "9":
                bundle.putString("newsId", bean.getNewsId());
                bundle.putString("liveType", bean.getLivetype());
                RouterManager.router(ARouterPathConstant.LIVE_NORMAL_ACTIVITY, bundle);
                toScene = ActionConstant.TOPNEWS;
                break;
            case "10":
                bundle.putString("id", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.NEWS_CATCH, bundle);
                toScene = ActionConstant.TOPRECOMMENDNEWS;
                break;
            case "11":

                isSaveLog = false;
                break;
            case "12":
                isSaveLog = false;
                break;
            case "13":
                bundle.putString("id", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.JL_NEWS, bundle);
                break;
            default:
                break;
        }
        if (isSaveLog) {
            ActionLogUtils.getInstance().onEvent(ActionConstant.FLOWSCENE, ActionConstant.HOME, toScene);
        }
    }

    public void itemSkip(GlobalNewsBean bean, Context context, View view) {
        Activity activity = (Activity) context;
        String className = activity.getLocalClassName();
        boolean isSaveLog = false;
        String toScene = "";
        if (className.contains("HomeActivity")) {
            isSaveLog = true;
        }
        Bundle bundle = new Bundle();
        switch (bean.getType()) {
            case "0":
                itemTopSkip(bean, context);
                break;
            case "1":
                bundle.putString("id", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.NORMAL_NEWS_ACTIVITY, bundle);
                toScene = "news";
                break;
            case "2":
                bundle.putString("id", bean.getNewsId());
                bundle.putString("section", bean.getCatalogId());
                RouterManager.router(ARouterPathConstant.PICTURE_NEWS_ACTIVITY, bundle);

                toScene = "news";
                break;
            case "3":
                bundle.putString("id", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.VIDEO_NEWS_ACTIVITY, bundle);
                toScene = ActionConstant.NEWSDETAIL;
                break;
            case "4":
                if (StringUtils.isEmpty(bean.getUrl())) {
                    switch (bean.getLivetype()) {
                        case "1":
                            bundle.putString("id", bean.getCatalogId());
                            RouterManager.router(ARouterPathConstant.TELE_VIDEO_ACTIVITY, bundle);
                            break;
                        case "2":
                            bundle.putString("id", bean.getCatalogId());
                            RouterManager.router(ARouterPathConstant.SCOOP_DETAIL_ACTIVIT, bundle);
                            break;
                        case "3":
                            switch (bean.getOrigin()) {
                                case "1":
                                    bundle.putString("id", bean.getCatalogId());
                                    RouterManager.router(ARouterPathConstant.NORMAL_NEWS_ACTIVITY, bundle);
                                    break;
                                case "2":
                                    bundle.putString("id", bean.getCatalogId());
                                    bundle.putString("section", bean.getPublishDate());
                                    RouterManager.router(ARouterPathConstant.PICTURE_NEWS_ACTIVITY, bundle);
                                    break;
                                case "3":
                                    break;
                                case "4":
                                    break;
                                case "5":
                                    bundle.putString("id", bean.getCatalogId());
                                    RouterManager.router(ARouterPathConstant.VIDEO_NEWS_ACTIVITY, bundle);
                                    break;
                                case "8":
//                                    Router.build("room_act")
//                                            .with("roomId", Integer.parseInt(bean.getCatalogId()))
//                                            .go(context);
                                    break;
                                case "101":
                                    bundle.putString("id", bean.getCatalogId());
                                    RouterManager.router(ARouterPathConstant.NEWS_CATCH, bundle);
                                    break;
                                default:
                                    break;
                            }
                            break;
                        case "4":
                            bundle.putString("actId", bean.getCatalogId());
                            RouterManager.router(ARouterPathConstant.ACT_DETAILS, bundle);
                        case "5":
                            String userName = CommonUtils.getInstance().getUserName();
                            bundle.putString("userName", userName);
                            bundle.putInt("id", Integer.parseInt(bean.getCatalogId()));
                            RouterManager.routerLoginInterceptor(context,bundle,ARouterPathConstant.NINE_LUCK_DRAW);
                            break;
                        default:
                            bundle.putString("id", bean.getNewsId());
                            bundle.putString("title", bean.getTitle());
                            bundle.putString("url", bean.getUrl());
                            if (bean.getIsShare() != null && "0".equals(bean.getIsShare())) {
                                bundle.putBoolean("hasShare", false);
                            }else{
                                bundle.putBoolean("hasShare", true);
                            }
                            RouterManager.router(ARouterPathConstant.ADV, bundle);
                            break;
                    }
                } else {
                    bundle.putString("id", bean.getNewsId());
                    bundle.putString("title", bean.getTitle());
                    bundle.putString("url", bean.getUrl());
                    if (bean.getIsShare() != null && "0".equals(bean.getIsShare())) {
                        bundle.putBoolean("hasShare", false);
                    }else{
                        bundle.putBoolean("hasShare", true);
                    }
                    RouterManager.router(ARouterPathConstant.ADV, bundle);
                }

                toScene = ActionConstant.ADV;
                break;
            case "5":
                int id;
                try {
                    id = Integer.parseInt(bean.getNewsId());
                } catch (Exception e) {
                    id = -1;
                }
//                Router.build("room_act")
//                        .with("roomId", id)
//                        .go(context);
                toScene = ActionConstant.LIVE;
                break;
            case "6":
                bundle.putString("newsId", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.GOOD_LIFE_DETAIL, bundle);
                toScene = ActionConstant.LIVE;
                break;
            case "7":
                bundle.putSerializable("bean", bean);
                RouterManager.router(ARouterPathConstant.SMALL_VIDEO_LIST, bundle);
                toScene = ActionConstant.SMALLVIDEO;
                break;
            case "8":
                bundle.putString("id", bean.getNewsId());
                bundle.putString("title", bean.getTitle());
                bundle.putString("url", bean.getUrl());
                bundle.putString("logo", bean.getCover());
                int hasShare = (int) AppConfigUtil.getInstance().getConValue(AppConfigConstant.LINK_URL_SHARE);
                if (hasShare == 1) {
                    bundle.putBoolean("hasShare", false);
                }else{
                    bundle.putBoolean("hasShare", true);
                }
                RouterManager.router(ARouterPathConstant.NEWS_TITLE, bundle);
                toScene = ActionConstant.NEWSDETAIL;
                break;
            case "9":
                if ("audio".equals(bean.getLivetype())) {
                    bundle.putString("id", bean.getNewsId());
                    RouterManager.router(ARouterPathConstant.LIVE_RADIO, bundle);
                } else {
                    bundle.putString("id", bean.getNewsId());
                    RouterManager.router(ARouterPathConstant.LIVE_VIDEO, bundle);

                }
                break;
            case "10":
                bundle.putString("id", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.NEWS_CATCH, bundle);
                toScene = ActionConstant.RECOMMENDNEWS;
                break;
            case "11":
                bundle.putString("id", bean.getCatalogId());
                bundle.putString("title", bean.getTitle());
                bundle.putString("cover", bean.getCover());
                RouterManager.router(ARouterPathConstant.DETAIL_TOWN, bundle);
                toScene = ActionConstant.TOWNDETAIL;
                break;
            case "12":
                bundle.putString("id", bean.getCatalogId());
                bundle.putString("title", bean.getTitle());
                bundle.putString("cover", bean.getCover());
                RouterManager.router(ARouterPathConstant.DETAIL_GOV, bundle);

                toScene = ActionConstant.GOVDETAIL;
                break;
            case "13":
                bundle.putString("id", bean.getCatalogId());
                bundle.putString("title", bean.getTitle());
                bundle.putString("cover", bean.getCover());
                RouterManager.router(ARouterPathConstant.DETAIL_SPECIAL, bundle);
                toScene = ActionConstant.SPECIADETAIL;
                break;
            case "14":
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                    bundle.putString("id", bean.getNewsId() + "");
                    RouterManager.router(ARouterPathConstant.TELE_VIDEO_ACTIVITY, bundle);
                    toScene = ActionConstant.TELETEXTDETAIL;
                } else {
                    Toasty.normal(context, "此功能暂时不支持在当前手机系统版本上使用！").show();
                }
                break;
            case "15":
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                    bundle.putString("id", bean.getNewsId());
                    RouterManager.router(ARouterPathConstant.CIRCLE_DETAIL, bundle);
                    toScene = ActionConstant.CIRCLEDETAIL;
                } else {
                    Toasty.normal(context, "此功能暂时不支持在当前手机系统版本上使用！").show();
                }

                break;
            case "16":
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                    bundle.putString("id", bean.getNewsId());
                    RouterManager.router(ARouterPathConstant.CIRCLE_TOPIC, bundle);
                    toScene = ActionConstant.CIRCLETOPIC;
                } else {
                    Toasty.normal(context, "此功能暂时不支持在当前手机系统版本上使用！").show();
                }
                break;
            case "17":
                //暂无
                break;
            case "18":
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                    bundle.putString("id", bean.getNewsId());
                    RouterManager.router(ARouterPathConstant.SCOOP_DETAIL_ACTIVIT, bundle);
                    toScene = ActionConstant.SCOOPDETAIL;
                } else {
                    Toasty.normal(context, "此功能暂时不支持在当前手机系统版本上使用！").show();
                }
                break;
            case "19"://新活动
                bundle.putString("actId", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.ACT_DETAILS, bundle);
                toScene = ActionConstant.ACTIVITY_DETAIL;
                ActionLogUtils.getInstance().onEvent(ActionConstant.FLOWSCENE, ActionConstant.HOME, ActionConstant.ACTIVITY_DETAIL);
                break;
            case "20":
                bundle.putString("id", bean.getNewsId());
                RouterManager.router(ARouterPathConstant.SHOP_DETAIL, bundle);
                break;
            case "100":
                bundle.putString("id", bean.getCatalogId());
                bundle.putString("title", bean.getTitle());
                RouterManager.router(ARouterPathConstant.NEWS_LIST, bundle);
                break;
            case "101":
                toScene = ActionConstant.AD4_ADVS;
                ActionLogUtils.getInstance().onEvent(ActionConstant.CLICK_AD4);
                break;
            default:
                isSaveLog = false;
                break;
        }
        if (isSaveLog) {
            ActionLogUtils.getInstance().onEvent(ActionConstant.FLOWSCENE, ActionConstant.HOME, toScene);
        }
    }

}
